#!/bin/bash -x
option="$1"
if [ "$option" = "start" ];then
    echo 'start'
    systemctl start telegraf
    systemctl start influxdb
    systemctl start chronograf
elif [ "$option" = "restart" ] ; then
    echo 'restart'
    systemctl restart telegraf
    systemctl restart influxdb
    systemctl restart chronograf
elif [ "$option" = "stop" ] ; then
    echo 'stop'
    service telegraf stop
    service influxdb stop
    service chronograf stop
fi


